# 1.导入FastDFS
from fdfs_client.client import Fdfs_client


# 2.创建FastDFS客户端实力
client = Fdfs_client('./client.conf')

# 3.调用FastDFS客户端上传文件方法
ret = client.upload_by_filename('/home/python/Desktop/云.jpg')
print(ret)

ret = {'Group name': 'group1',
       'Remote file_id': 'group1/M00/00/00/wKjuhF0LeQuARtUqAAhvG8TJ8bQ290.jpg',
       'Status': 'Upload successed.', 'Local file name': '/home/python/Desktop/云.jpg',
       'Uploaded size': '539.00KB',
       'Storage IP': '192.168.238.132'}